#include<bits/stdc++.h>
using namespace std;

int main()
{
	int cnt=0;
	while(1)
	{
		system("data.exe");system("stamp.exe");system("newedge.exe");
		if(system("fc stamp.out new.out"))break;
		cout<<++cnt<<endl; 
	}
}
